package com.rc.saas.mini.service.ugs;

import com.rc.saas.mini.mapper.ugs.TenantUgsLevelGainMapper;
import com.rc.saas.mini.model.ugs.TenantUgsLevelGain;
import com.rc.saas.mini.model.ugs.TenantUgsLevelGainExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TenantUgsLevelGainServiceImpl implements TenantUgsLevelGainService {

    @Autowired
    private TenantUgsLevelGainMapper tenantUgsLevelGainMapper;

    @Override
    public TenantUgsLevelGainMapper getMapper() {
        return tenantUgsLevelGainMapper;
    }

    @Override
    public List<TenantUgsLevelGain> selectTenantUgsLevelGainByTenantCode(String tenantCode, String lvType) {
        TenantUgsLevelGainExample example =new TenantUgsLevelGainExample();
        example.createCriteria().andTenantCodeEqualTo(tenantCode).andStatusEqualTo("0").andLvTypeEqualTo(lvType);
        example.setOrderByClause("sort");
        return tenantUgsLevelGainMapper.selectByExample(example);
    }
}
